package cn.com.ejiakanghu.vo.serviceorder;

import org.linlinjava.litemall.db.domain.LitemallGoods;
import org.linlinjava.litemall.db.vo.app.StoreGoodsVo;

import java.math.BigDecimal;

/**
 * @author huangfei
 * @create 2021-11-22 10:05
 */
public class PriceInfo {

    /**
     *
     */
    private BigDecimal price;

    /**
     *
     */
    private String suffix;

    /**
     * 划线价格
     */
    private BigDecimal linePrice;

    public PriceInfo() {

    }

    public BigDecimal getPrice() {
        return price;
    }

    public void setPrice(BigDecimal price) {
        this.price = price;
    }

    public String getSuffix() {
        return suffix;
    }

    public void setSuffix(String suffix) {
        this.suffix = suffix;
    }

    public BigDecimal getLinePrice() {
        return linePrice;
    }

    public void setLinePrice(BigDecimal linePrice) {
        this.linePrice = linePrice;
    }

    public PriceInfo(LitemallGoods goods) {
        this.price = goods.getCounterPrice();
        this.linePrice = goods.getRetailPrice();
        this.suffix = goods.getUnit();
    }


    /**
     * 封装商品赋值
     * @param storeGoods
     */
    public PriceInfo(StoreGoodsVo storeGoods) {
        this.price = storeGoods.getSaleRetailPrice();
        this.linePrice = storeGoods.getRetailPrice();
        this.suffix = storeGoods.getUnit();
    }
}
